Required Suite | |
---|---|
Term | Description |
Open | Opens a file.
Example: open file "Hard Disk:Scan.html" readonly yes |
| A file specification, specifying the file to open. |
| Takes three values: yes, no, and default.
"yes" will open the file read onlyThe readonly parameter is optional. |
Currently does the same as open.
Example: print file "Hard Disk:Scan.html" | |
| A file specification, specifying the file to open. |
Quit | Quits PageInspector.
Example: quit saving ask |
| Takes three values: yes, no, and ask. "yes" will save the open file on quit, "no" will discard any changes you made to the open file in PageInspector. "ask" will display the save changes dialog. The saving parameter is optional. |
Run | Opens PageInspector. This is done automatically in AppleScript through the "tell" statement. |
Standard Suite | |
---|---|
Term | Description |
Close | Closes either a window or a document.
Example: close document 1 saving no |
| A window or document class, specifying the window or document to close. |
| This parameter is identical to the "saving" parameter of the "Quit" term. The saving parameter is optional. |
Count | Returns the number of elements in a particular class. PageInspector allows you to get the count of the number of documents open, the number of errors in the Errors window, and the number of windows (including closed windows) open.
Example: set errorsFound to count of HTML Error |
| Any class, specifying the object whose elements are to be counted. |
Delete | Allows you to delete the "cause" of an error from an HTML file.
Example: delete HTML Error 3 |
| An HTML Error, specifying the error to delete. The text that is underlined in the Error Preview bar when this error is highlighted will be deleted. The error will also be removed from the Error list. |
Exists | Returns a value of true if the object passes as the direct parameter exists. Otherwise, a value of false is returned.
Example: if document 1 exists then close document 1 |
| Any class, specifying the object in question. |
Save | Allows you to save any changes you have made to the open document.
Example: save document 1 |
| A document, specifying the document to save. |
Select | Allows you to select an item in the Errors Window.
Example: Select HTML Error 6 |
| An HTML Error, specifying the HTML Error to select. |
Classes | |
Class | Description |
Window | There are usually two elements in this class - one for the Information window, and one for the Errors window. If no errors are found, and so the errors window is not displayed, then the Window class will only contain one element - that of the Information window. You may access the windows contained in this class either by index, or by window name. The front window may be accessed by using an index of 1, the back window, or a closed window may be accessed by using an index of 2. You may also access a window by using the name that appears in the window's title bar, eg. "Errors" for the Error window, and "<file name> Info" for the Info window. Alternatively, to access the Info window, you may use the constant name "Information Window". |
| A rectangle that contains the boundary rectangle of the window. To change the size and position of a window, you can set this value. |
| If this has a value of true, then the window in question has a close box, otherwise the window doesn't have a close box. You are unable to change the value of this property. |
| If this has a value of true, then the window in question has a title bar. You are unable to change the value of this property. |
| This property contains the index of the window you are accessing. This is only useful if you access the window via its name instead of its index. Setting this value to 1 will bring a window of index 2 to the front. Setting this value to 2 will send a window of index 1 to the back. You can only change the value of this property if both windows are open. |
| If this property has a value of true, the window in question is a floating palette. Currently, there are no floating palettes in PageInspector. You are unable to set the value of this property. |
| If this property has a value of true, the window in question is a modal dialog. Currently, there are no modal dialogs in PageInspector. You are unable to set the value of this property. |
| If this property has a value of true, the window in question can be resized, that is, there is a size box in the lower right hand corner of the window. You are unable to set the value of this property. |
| If this property has a value of true, the window in question has a zoom box. Currently, none of PageInspector's windows have a zoom box, though this should change by next version. You are unable to set the value of this property. |
| If this property has a value of true, the window in question is zoomed to full size. As no windows in PageInspector are zoomable at the moment, this property is currently useless. |
| This property contains the text that is shown in the title bar of the window in question. You are unable to set the value of this property. |
| If this property has a value of true, then the window is currently on screen, although it may not necessarily be the front window. If you set the value of this property to false, the window in question is closed. If there are no other windows open, the open file is closed as well, and if any changes have been made to the file, the save changes dialog will be displayed. |
| This property contains the top left co-ordinates of the window in question. Setting this value will move the window, without bringing it to the front or changing its dimensions. |
PageInspector Suite | |
---|---|
Term | Description |
Scanning File | Allows you to ascertain whether PageInspector is currently scanning a file. A value of true will be returned if a file is being scanned, otherwise a value of false will be returned. If you try to access properties of classes or send an event to PageInspector while a scan is taking place, you will receive an error.
Example: if Scanning File is equal to true then display dialog "File is still being scanned!" |
Selected HTML Error | Allows you to determine the index of the error currently selected in the Errors window, returned as a short integer. A value of 0 means that either the Errors window is closed, or there is no selection. This event will fail if there is no document open or the Errors Window was not created.
Example: delete HTML Error (Selected HTML Error) |
Fix | Fixes an HTML Error internally with PageInspector, without asking the user for confirmation. This event will fail if the HTML Error is not fixable.
Example: Fix HTML Error (Selected HTML Error) |
| An HTML Error, specifying the error to fix. |
Classes | |
Class | Description |
Document | In this version of PageInspector, there is a maximum of one element in this class at a time, as you cannot have multiple files open. You can access the one element either by its index (1), or by the file's name. |
| This property contains a file specification of the open file. You can use this property to open the file in other programs, or to access the file in the Finder. You are unable to set the value of this property. |
| The index of the document in question. You are unable to set the value of this property. |
| The internal title of the HTML document. You can use "exists title of document 1" if unsure of whether the open document has a title. You are unable to set the value of this property. |
| This boolean value is set to true if the document has been modified within PageInspector since being opened. You are unable to change the value of this property, but it you wish to save modifications made to a file, use the save command. |
| If the value of this property is true, then the document was opened read only, and cannot be modified from within PageInspector. You are unable to modify the value of this property |
| The path of the specified document, as it appears in the Info Window, is stored in this value. You are unable to modify the value of this property. |
| This property contains the number of seconds the specified document will take to download, including the time to download all linked images, etc., although the time to download any images on a frame source is not included in this estimate. A value of 0 means that the specified document will take less than a second to download. You are unable to modify the value of this property. |
| If the value of this property is true, the specified document contained frames. This information may be useful if you want to know if the value obtained from "download of document 1" is correct. (See above.) |
| if this property contains a value of true, the links of the specified document were checked. If the value of this property is false, links were not checked, and so the download time of the document will not include any linked images, etc. |
HTML Error | This class contains information about all errors in the Error window. You can access an error only via its index and you can obtain the number of errors found in a file through "get count of HTML Error". |
| This is the actual string that is shown in the error window. You are unable to set the value of this property. |
| This property contains the type of the specified error, as indicated by the icon that appears next to the error in the Error list. This property will contain the value either:
|
| This boolean value is set to true if the specified error can be fixed automatically by PageInspector via the "Fix" button. You cannot set the value of this property. |
| This boolean value is set to true if the specified error can be deleted by PageInspector via the "Trash" button. You cannot set the value of this property. |
| This property contains the string that is displayed under the heading "Explanation" in the "Error Information" dialog. You cannot set the value of this property. |
| This property contains the string that is displayed under the heading "Solution" in the "Error Information" dialog. You cannot set the value of this property. |
| This property contains the character index of the first character that appears underlined in the Error preview bar. You can use this value to locate the specified error's position in other applications. You cannot set the value of this property. |
| This property contains the character index of the last character that appears underlined in the Error preview bar. You can use this value to locate the specified error's position in other applications. You cannot set the value of this property. |
| This property contains a value of true if the position of the specified error is known to PageInspector (ie. If text appears in the Error Preview bar when the specified error is highlighted.). You cannot set the value of this property. |
| This property contains the text that is underlined when the specified error is highlighted. You cannot set the value of this property. |